#include <stdio.h>
void psort( int *pa, int *pb,int *pc,int *pd)
{
    int s[4] = {*pa,*pb,*pc,*pd};
    int i,j,t;
    for(i = 0;i<4;i++)
    {
        for(j = i + 1; j < 4; j ++)
        {
            if(s[i] <= s[j])
            {
                t = s[i];
                s[i] = s[j];
                s[j] = t;
            }
        }
    }

    for(int i = 0; i < 4; i ++)
        printf("%d ", s[i]);
}
int main()
{
    int a,b,c,d;
    scanf("%d%d%d%d", &a, &b, &c, &d);
    psort(&a, &b, &c, &d);
    return 0;
}
